#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_misc.dpatch by Mazen Neifer <mazen.neifer@supaero.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch adds misc.

@DPATCH@
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_html.sh mseide-msegui-1.8/misc/doc_gen/fpc/make_html.sh
*** mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_html.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/fpc/make_html.sh	2008-08-18 18:25:47.000000000 +0200
***************
*** 0 ****
--- 1,151 ----
+ #!/bin/sh
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ 
+ subos=
+ [ $os == "linux" ] && subos="unix"
+ [ $os == "win32" ] && subos="win32"
+ [ $os == "windows" ] && subos="win32"
+ 
+ this_dir=`pwd`
+ 
+ # reading the settings
+ source ../ini/fplib_doc.ini
+ 
+ [ -d $fpc_doc_root ] || {
+   echo -e "Directory $fpc_doc_root does not exist but should be created by a make_xml.sh. So, exiting..."
+   exit
+ }
+ 
+ InputFileList=inputfile.txt
+ DescrFileList=descrfile.txt
+ 
+ function do_it () {
+ # $1 = $ref
+ # $2 = PkgName
+ # $3 = inc_dirs
+ # $4 = defines
+ # $5 = external imports
+ 
+   local inc_dirs; local defs; local imports;
+   local src_dir; local xml_dir; local html_dir;
+   local DescrFiles; local UnitListPp; local UnitListPas; local UnitList;
+   local CurInputFileList; local CurDescrFileList;
+   local unit_file; local pas_file; local pp_file; local cur_dir_inc;
+   local pkg;
+ 
+   src_dir="$fpc_src_dir/$1"
+ #echo $src_dir  
+   
+ #  xml_dir=${fpc_doc_root}/xml/$1
+ xml_dir=`echo ${fpc_doc_root}/xml/$1 | sed "s/\/src\///"`
+ xml_dir=`echo ${xml_dir} | sed "s/\/src\$//"`  
+ 
+ echo "\$1:"$1
+ echo "dr:"${fpc_doc_root}
+ 
+ #  pkg=`echo $pkg_name | sed "s/_src\$//"`    
+ echo "x:"$xml_dir    
+ 
+   [ -d $xml_dir ] || {
+     echo -e "Directory $xml_dir does not exist. So, skipping..."
+     return
+   }
+ #  html_dir=${fpc_doc_root}/html/$1
+ 
+ html_dir=`echo ${fpc_doc_root}/html/$1 | sed "s/\/src\///"`
+ html_dir=`echo ${html_dir} | sed "s/\/src\$//"`  
+ echo "h:"$html_dir      
+   
+ # recreating the HTML dir to empty its contents
+   rm -rf -- $html_dir
+   mkdir -p -- $html_dir || exit 0
+ # cp -f -- $this_dir/../xml_templates/$2.xml.start $xml_dir/$2.xml
+ 
+ # create description file list
+   DescrFiles=`find $xml_dir -name *.xml`
+ 
+ # create unit file list
+   UnitListPp=`find  $src_dir -name *.pp`
+   UnitListPas=`find $src_dir -name *.pas`
+   UnitList=`echo -e $UnitListPp" "$UnitListPas | sort -ru`
+ 
+ #echo $UnitList
+ 
+   inc_dirs=
+   for id in $3; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$1/${id}"
+   done
+ 
+   defs=
+   for def in $4; do
+     defs="${defs} -d${def}"
+   done
+ 
+   imports=
+   for imp in $5; do
+     imports="${imports} --import=${imp}"
+   done
+ 
+ # [re]create input file list
+   CurInputFileList=$html_dir/$InputFileList
+   [ -f $CurInputFileList ] && rm -f $CurInputFileList
+ 
+ # [re]create description file list
+   CurDescrFileList=$html_dir/$DescrFileList
+   [ -f $CurDescrFileList ] && rm -f $CurDescrFileList
+ 
+   for descr in $DescrFiles; do
+     echo $descr >> $CurDescrFileList  
+ 
+ #   only existing XMLs -> *.(pas|pp)   
+     unit_file=`echo $descr | awk -v R1="${fpc_doc_root}/xml/" -v R2="$fpc_src_dir/" '{ gsub(R1,R2,$0); print $0; }' | sed 's/.\xml//g'`
+   
+     pas_file="${unit_file}.pas"
+     if [ -f $pas_file ]; then
+       cur_dir_inc="-Fi"`dirname $pas_file`
+       echo $pas_file $cur_dir_inc "$inc_dirs" >> $CurInputFileList  
+     fi
+   
+     pp_file="${unit_file}.pp"
+     if [ -f $pp_file ]; then
+       cur_dir_inc="-Fi"`dirname $pp_file`
+       echo $pp_file $cur_dir_inc "$inc_dirs" >> $CurInputFileList  
+     fi
+ 
+   done
+ 
+     pkg=`echo -e $2 | tr "+\/-" "_"`
+     pkg=`echo $pkg | sed "s/_src_/_/"`
+     pkg=`echo $pkg | sed "s/_src\$//"`    
+ 
+ #  FPDocParams="--content=${html_dir}/$2.xct --package=$2 --descr=$xml_dir/$2.xml --format=html $imports"
+ 
+ #  FPDocParams="--content=${html_dir}/${pkg}.xct --package=${pkg} --descr=$xml_dir/${pkg}.xml --format=html $imports"
+   FPDocParams="--content=${html_dir}/${pkg}.xct --package=${pkg} --descr=/tmp/1.xml --format=html $imports"
+ echo $FPDocParams  
+ 
+   cd $html_dir
+   fpdoc --descr=@$DescrFileList --input=@$InputFileList $FPDocParams
+ #  rm -f -- $CurInputFileList $CurDescrFileList $html_dir/$2.xml
+   rm -f -- $CurInputFileList $CurDescrFileList $html_dir/${pkg}.xml
+ }
+ 
+ # ========== RTL ==============
+ do_it "rtl" "rtl" "$rtl_inc_dirs" "$rtl_defines"
+ 
+ for fcld in $fcl_dirs; do
+  do_it "packages/${fcld}" $fcld "$fcl_inc_dirs" "$fcl_defines" "$fcl_imports"
+ done
+ 
+ # Uncomment the below lines to make HTML docs for the FPC packages as well - It may take a long !
+ #
+ #do_it "packages/base" "packages_base" "$base_pkg_inc_dirs" "$base_pkg_defines"
+ #do_it "packages/extra" "packages_extra" "$extra_pkg_inc_dirs" "$extra_pkg_defines"
+ 
+ cd $this_dir
+ #===============================
+ 
+ exit 0
+ 
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_xml-new.sh mseide-msegui-1.8/misc/doc_gen/fpc/make_xml-new.sh
*** mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_xml-new.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/fpc/make_xml-new.sh	2008-08-18 14:18:20.000000000 +0200
***************
*** 0 ****
--- 1,152 ----
+ #!/bin/sh
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ 
+ subos=
+ [ $os == "linux" ] && subos="unix"
+ [ $os == "win32" ] && subos="win32"
+ [ $os == "windows" ] && subos="win32"
+ 
+ #fpc_ver=`fpc -l | head -1 | awk '{ print $5; }'`
+ 
+ this_dir=`pwd`
+ 
+ # reading the settings
+ source ../ini/fplib_doc.ini
+ 
+ [ -d $fpc_doc_root ] || mkdir -p -- $fpc_doc_root || exit
+ #*******************************************************************************************
+ function one_dir () {
+ # $1 : output directory for XML-files
+ # $2 : package name to write in XML-files
+ # $3 : -Fi<include_dir>-s & -d<define>-s 
+ 
+   local in_file; local out_file;
+ 
+   for in_file in `ls -A1 *.pas *.pp 2>/dev/null`; do
+     cat ./$in_file | head -40 | egrep -ie "^[ \t]*program[[:space:]]+[[:alpha:]]+[_[:alnum:]]*[[:space:]]*;" >/dev/null && continue  
+     out_file=$1"/"`echo $in_file | sed "s/\.\(pas\|pp\)$/\.xml/"`
+     echo "  ${in_file} -> ${out_file}"
+     [ -f $out_file ] || rm -f -- $out_file
+ 
+     if ! makeskel --package=$2 --input=./${in_file}" $3" --output=${out_file} --disable-private --disable-protected; then
+       rm -f -- ${out_file}
+     fi
+ 
+   done
+ }
+ #---------- RTL start ----------------------------------------
+ ref=
+ defs=
+ inc_dirs=
+ xml_descr=
+ #--------------
+ function do_it () {
+   local inc_dirs1;
+ 
+ # if docs dir does not exist then to create it  
+   xml_dir="${fpc_doc_root}/xml/$ref"
+   rm -rf -- $xml_dir
+   mkdir -p -- $xml_dir || exit 0
+   cp -f -- $this_dir/../xml_templates/${xml_descr}.xml $xml_dir/
+ 
+   for dir in $1; do
+     src_dir=${fpc_src_dir}/$ref/${dir}
+     inc_dirs1="-Fi./ -Fi${src_dir} ${inc_dirs}"
+     tmp=`echo -e $dir | awk -v R=$fpc_src_dir/ '{ gsub(R,"",$0); print $0; }'`
+     out_dir="${xml_dir}/${tmp}"
+ #   package name may not contain "-"    
+     pkg_name=`echo -e $tmp | tr "+\/-" "_"`
+     mkdir -p -- $out_dir
+ 
+ #   the only way to correctly process "../*" path references in the source files
+     cd $src_dir || exit
+     echo -e "\nEntering ${src_dir}..."
+     one_dir $out_dir $pkg_name "$inc_dirs1 $defs"
+   done
+ }
+ 
+ #---------- RTL ----------------------------------------
+ function do_rtl () {
+   ref="rtl"
+   xml_descr="rtl"
+ 
+   for id in $rtl_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $rtl_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$rtl_dirs"
+ }
+ #---------- FCL ----------------------------------------
+ function do_fcl () {
+   ref="packages"
+ #  ref1="/src"
+   xml_descr="fcl"
+   defs=
+   inc_dirs=
+ 
+   for id in $fcl_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/${ref}/${id}"
+   done
+ 
+ #  for fd in $fcl_dirs; do
+ #    inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/${ref}/${fd}"
+ #  done
+ 
+   for def in $fcl_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$fcl_dirs"
+ }
+ #---------- BASE PKG ----------------------------------------
+ function do_base_pkg () {
+   ref="packages/base"
+ #  ref1=
+   xml_descr="packages_base"
+   defs=
+   inc_dirs=
+ 
+   for id in $base_pkg_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $base_pkg_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$base_pkg_dirs"
+ }
+ #---------- EXTRA PKG ----------------------------------------
+ function do_extra_pkg () {
+   ref="packages/extra"
+ #  ref1=  
+   xml_descr="packages_extra"
+   defs=
+   inc_dirs=
+ 
+   for id in $extra_pkg_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $extra_pkg_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$extra_pkg_dirs"
+ }
+ #--------------------------------------------------
+ do_rtl;
+ do_fcl;
+ 
+ # Uncomment the below lines to make XML skeletons for the FPC packages as well
+ #
+ #do_base_pkg;
+ #do_extra_pkg;
+ 
+ cd $this_dir; exit 0
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_xml.sh mseide-msegui-1.8/misc/doc_gen/fpc/make_xml.sh
*** mseide-msegui-1.8.orig/misc/doc_gen/fpc/make_xml.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/fpc/make_xml.sh	2008-08-18 14:18:34.000000000 +0200
***************
*** 0 ****
--- 1,184 ----
+ #!/bin/sh
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ 
+ subos=
+ [ $os == "linux" ] && subos="unix"
+ [ $os == "win32" ] && subos="win32"
+ [ $os == "windows" ] && subos="win32"
+ 
+ #fpc_ver=`fpc -l | head -1 | awk '{ print $5; }'`
+ 
+ this_dir=`pwd`
+ 
+ # reading the settings
+ source ../ini/fplib_doc.ini
+ 
+ [ -d $fpc_doc_root ] || mkdir -p -- $fpc_doc_root || exit
+ #*******************************************************************************************
+ function one_dir () {
+ # $1 : output directory for XML-files
+ # $2 : package name to write in XML-files
+ # $3 : -Fi<include_dir>-s & -d<define>-s 
+ 
+   local in_file; local out_file; local pkg; local i_f
+ 
+   for in_file in `ls -A1 *.pas *.pp 2>/dev/null`; do
+     cat ./$in_file | head -40 | egrep -ie "^[ \t]*program[[:space:]]+[[:alpha:]]+[_[:alnum:]]*[[:space:]]*;" >/dev/null && continue  
+     out_file=$1"/"`echo $in_file | sed "s/\.\(pas\|pp\)$/\.xml/"`
+     echo "  ${in_file} -> ${out_file}"
+     
+ #    out_file=`echo $out_file | sed "s/\/src\//\//"`
+    
+ #    pkg=`echo $2 | sed "s/_src_/_/"`
+ #echo "pkg: "$pkg            
+ #echo "in: "$in_file            
+ #echo "out: "$out_file        
+ #return    
+ 
+     
+     [ -f $out_file ] || rm -f -- $out_file
+ 
+ #    cat ./${in_file} | egrep -ve "<|>" > /tmp/msegui_doc.tmp
+     if ! makeskel --package=$2 --input=./${in_file}" $3" --output=${out_file} --disable-private --disable-protected; then
+       rm -f -- ${out_file}
+     fi
+ 
+ #    if ! makeskel --package=$pkg --input=./${in_file}" $3" --output=${out_file} --disable-private --disable-protected; then
+ #      rm -f -- ${out_file}
+ #    fi
+ 
+ 
+ #    if ! makeskel --package=$pkg --input=/tmp/msegui_doc.tmp" $3" --output=${out_file} --disable-private --disable-protected; then
+ #      rm -f -- ${out_file}
+ #    fi
+ 
+ 
+ 
+   done
+ }
+ #---------- RTL start ----------------------------------------
+ ref=
+ defs=
+ inc_dirs=
+ xml_descr=
+ #--------------
+ function do_it () {
+   local inc_dirs1;
+ 
+ # if docs dir does not exist then to create it  
+   xml_dir="${fpc_doc_root}/xml/$ref"
+   rm -rf -- $xml_dir
+   mkdir -p -- $xml_dir || exit 0
+   cp -f -- $this_dir/../xml_templates/${xml_descr}.xml $xml_dir/
+ 
+   for dir in $1; do
+     src_dir=${fpc_src_dir}/$ref/${dir}
+     inc_dirs1="-Fi./ -Fi${src_dir} ${inc_dirs}"
+     tmp=`echo -e $dir | awk -v R=$fpc_src_dir/ '{ gsub(R,"",$0); print $0; }'`
+ 
+ #    out_dir="${xml_dir}/${tmp}"
+     out_dir=`echo ${xml_dir}/${tmp} | sed "s/\/src\//\//"`
+     out_dir=`echo ${out_dir} | sed "s/\/src\$//"`
+ #echo  "--"$out_dir   
+ #return
+ #    out_file=`echo $out_file | sed "s/\/src\//\//"`
+     
+ #   package name may not contain "-"    
+     pkg_name=`echo -e $tmp | tr "+\/-" "_"`
+     pkg_name=`echo $pkg_name | sed "s/_src_/_/"`
+     pkg_name=`echo $pkg_name | sed "s/_src\$//"`    
+     
+     mkdir -p -- $out_dir
+ 
+ #   the only way to correctly process "../*" path references in the source files
+     cd $src_dir || exit
+     echo -e "\nEntering ${src_dir}..."
+     one_dir $out_dir $pkg_name "$inc_dirs1 $defs"
+   done
+ }
+ 
+ #---------- RTL ----------------------------------------
+ function do_rtl () {
+   ref="rtl"
+   xml_descr="rtl"
+ 
+   for id in $rtl_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $rtl_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$rtl_dirs"
+ }
+ #---------- FCL ----------------------------------------
+ function do_fcl () {
+   ref="packages"
+ #  ref1="/src"
+   xml_descr="fcl"
+   defs=
+   inc_dirs=
+ 
+   for id in $fcl_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/${ref}/${id}"
+   done
+ 
+ #  for fd in $fcl_dirs; do
+ #    inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/${ref}/${fd}"
+ #  done
+ 
+   for def in $fcl_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$fcl_dirs"
+ }
+ #---------- BASE PKG ----------------------------------------
+ function do_base_pkg () {
+   ref="packages/base"
+ #  ref1=
+   xml_descr="packages_base"
+   defs=
+   inc_dirs=
+ 
+   for id in $base_pkg_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $base_pkg_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$base_pkg_dirs"
+ }
+ #---------- EXTRA PKG ----------------------------------------
+ function do_extra_pkg () {
+   ref="packages/extra"
+ #  ref1=  
+   xml_descr="packages_extra"
+   defs=
+   inc_dirs=
+ 
+   for id in $extra_pkg_inc_dirs; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$ref/${id}"
+   done
+ 
+   for def in $extra_pkg_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$extra_pkg_dirs"
+ }
+ #--------------------------------------------------
+ do_rtl;
+ do_fcl;
+ 
+ # Uncomment the below lines to make XML skeletons for the FPC packages as well
+ #
+ #do_base_pkg;
+ #do_extra_pkg;
+ 
+ cd $this_dir; exit 0
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/ini/fplib_doc.ini mseide-msegui-1.8/misc/doc_gen/ini/fplib_doc.ini
*** mseide-msegui-1.8.orig/misc/doc_gen/ini/fplib_doc.ini	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/ini/fplib_doc.ini	2008-08-18 14:15:36.000000000 +0200
***************
*** 0 ****
--- 1,55 ----
+ # *********************************
+ #
+ # User-definable stuff
+ #
+ # A Free Pascal source tree top - contains rtl/, compiler/, utils/, etc
+ #
+ 
+ FPC_VER=`fpc -iV`
+ fpc_src_dir="/usr/lib/fpc/${FPC_VER}";
+ 
+ # a common place for all software's non-MAN/INFO documentation
+ #
+ sys_doc_root=/usr/share/doc
+ 
+ # a name for FPC documentation within the above, should NOT be mixed with such docs's place installed by the regular way 
+ #
+ fplib_doc_subdir="fp-libs-all"
+ 
+ # A directory of XML files taken from a "fp-docs" SVN source. Contains "baseunix.xml", "rtl.xml", "fcl.xml", etc.
+ # These files are human documented and meant to replace autogenerated one
+ #
+ fpdocs_from_svn=/usr/src/SVNROOT/fpdocs
+ # *********************************
+ #
+ # edit on wish but with care !
+ #
+ fpc_doc_root="$sys_doc_root/$fplib_doc_subdir"
+ 
+ rtl_dirs="common $cpu $os objpas $subos inc"
+ rtl_inc_dirs="inc common ${os}/${cpu} $os $cpu objpas objpas/classes objpas/sysutils $subos"
+ rtl_defines=""
+ rtl_imports=""
+ 
+ #fcl_prefix="packages/fcl"
+ 
+ fcl_dirs="fcl-db/src fcl-db/src/dbase fcl-db/src/memds fcl-db/src/sdf fcl-db/src/sqldb fcl-db/src/sqlite fcl-image/src fcl-net/src fcl-passrc/src fcl-xml/src paszlib/src hash/src fcl-async/src fcl-json/src fcl-process/src fcl-registry/src fcl-web/src"
+ fcl_inc_dirs="inc ${os} $subos"
+ fcl_defines=""
+ fcl_imports="$fpc_doc_root/html/rtl/rtl.xct,../rtl/"
+ 
+ base_pkg_dirs="gdbint graph/$subos hash ibase libasync/$subos libc mysql netdb odbc oracle pasjpeg paszlib postgres pthreads regexpr sqlite"
+ base_pkg_inc_dirs="graph/inc libasync"
+ base_pkg_defines=""
+ base_pkg_imports="$fcl_imports $fpc_doc_root/html/fcl/fcl.xct,../../fcl/"
+ 
+ extra_pkg_dirs="bfd bzip2 cdrom fftw forms fpgtk fpgtk/def gdbm ggi \
+   gnome1/gconf/gconf gnome1/gconf/gconfclient gnome1/gnome/libart_lgpl gnome1/gnome/libgnome gnome1/gnome/libgnomeui gnome1/zvt/zvt \
+   gtk/conv gtk/gdk gtk/glib gtk/gtk gtk/gtkgl \
+   gtk2/atk gtk2/glib gtk2/gtk+/gdk gtk2/gtk+/gdk-pixbuf gtk2/gtk+/gtk gtk2/gtkglext gtk2/gtkhtml gtk2/libglade gtk2/pango \
+   hermes imlib/gdk_imlib imlib/imlib libgd libpng ncurses newt numlib opengl ptc rexx sndfile svgalib syslog tcl \
+   unixutil unzip users utmp uuid x11 zlib"
+ 
+ extra_pkg_inc_dirs="hermes/$cpu ptc/x11 ptc/c_api"
+ extra_pkg_defines=""
+ extra_pkg_imports="$base_pkg_imports $fpc_doc_root/html/packages/base/packages_base.xct,../base/"
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/ini/msegui_doc.ini mseide-msegui-1.8/misc/doc_gen/ini/msegui_doc.ini
*** mseide-msegui-1.8.orig/misc/doc_gen/ini/msegui_doc.ini	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/ini/msegui_doc.ini	2008-08-18 18:24:29.000000000 +0200
***************
*** 0 ****
--- 1,37 ----
+ # *********************************
+ #
+ # User-definable stuff
+ #
+ # A MSEGUI source tree top contains apps/, lib/, tools/, README.TXT, etc
+ #
+ msegui_src_dir="/usr/src/mseide-msegui";
+ 
+ # a subdirectory for MseGUI documentation within "$sys_doc_root" ( see "fplib_doc.ini" )
+ #
+ msegui_doc_subdir="mseide-msegui-doc/rtl"
+ 
+ # *********************************
+ #
+ # edit on wish but with care !
+ # Coomonly, "$msegui_imports" may also be extened the FPC (base/extra) packages content (files/directories) for full
+ # type referencing
+ #
+ msegui_doc_root="$sys_doc_root/$msegui_doc_subdir";
+ 
+ msegui_dirs="lib";
+ msegui_defines=""
+ 
+ #msegui_imports="$fpc_doc_root/html/rtl/rtl.xct,../../../$fplib_doc_subdir/html/rtl/ \
+ #    $fpc_doc_root/html/fcl/fcl.xct,../../../$fplib_doc_subdir/html/fcl/"
+ 
+ msegui_imports=
+ 
+ # Uncomment to make crossreferences with FPC base packages. The xct-file should exist!
+ #
+ # msegui_imports="$msegui_imports \
+ #    $fpc_doc_root/html/packages/base/packages_base.xct,../../../$fplib_doc_subdir/html/packages/base/"
+ 
+ # Uncomment to make crossreferences with FPC extra packages. The xct-file should exist! 
+ #
+ # msegui_imports="$msegui_imports \
+ #    $fpc_doc_root/html/packages/base/packages_extra.xct,../../../$fplib_doc_subdir/html/packages/extra/"
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/msegui/fpdoc.css mseide-msegui-1.8/misc/doc_gen/msegui/fpdoc.css
*** mseide-msegui-1.8.orig/misc/doc_gen/msegui/fpdoc.css	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/msegui/fpdoc.css	2008-01-23 20:28:00.000000000 +0100
***************
*** 0 ****
--- 1,129 ----
+ /*
+   $Id: fpdoc.css 7437 2005-07-28 14:02:24Z vincents $
+ 
+   Default style sheet for FPDoc reference documentation
+   by Sebastian Guenther, sg@freepascal.org
+ 
+   Feel free to use this file as a template for your own style sheets.
+ */
+ 
+ body {
+   background: white
+ }
+ 
+ body, p, th, td, caption, h1, h2, h3, ul, ol, dl {
+   color: black;
+   font-family: sans-serif
+ }
+ 
+ tt, span.kw, pre {
+   font-family: Courier, monospace
+ }
+ 
+ body, p, th, td, caption, ul, ol, dl, tt, span.kw, pre {
+   font-size: 14px
+ }
+ 
+ A:link {
+   color: blue
+ }
+ 
+ A:visited {
+   color: darkblue
+ }
+ 
+ A:active {
+   color: red
+ }
+ 
+ A {
+   text-decoration: none
+ }
+ 
+ A:hover {
+   text-decoration: underline
+ }
+ 
+ h1, h2, td.h2 {
+   color: #005A9C
+ }
+ 
+ /* Especially for Netscape on Linux: */
+ h3, td.h3 {
+   font-size: 12pt
+ }
+ 
+ /* symbols in source fragments */
+ span.sym {
+   color: darkred
+ }
+ 
+ /* keywords in source fragments */
+ span.kw {
+   font-weight: bold
+ }
+ 
+ /* comments in source fragments */
+ span.cmt {
+   color: darkcyan;
+   font-style: italic
+ }
+ 
+ /* directives in source fragments */
+ span.dir {
+   color: darkyellow;
+   font-style: italic
+ }
+ 
+ /* numbers in source fragments */
+ span.num {
+   color: darkmagenta
+ }
+ 
+ /* characters (#...) in source fragments */
+ span.chr {
+   color: darkcyan
+ }
+ 
+ /* strings in source fragments */
+ span.str {
+   color: blue
+ }
+ 
+ /* assembler passages in source fragments */
+ span.asm {
+   color: green
+ }
+ 
+ 
+ td.pre {
+   white-space: pre
+ }
+ 
+ p.cmt {
+   color: gray
+ }
+ 
+ span.warning {
+   color: red;
+   font-weight: bold
+ }
+ 
+ /* !!!: How should we define this...? */
+ span.file {
+   color: darkgreen
+ }
+ 
+ table.remark {
+   background-color: #ffffc0;
+ }
+ 
+ table.bar {
+   background-color: #a0c0ff;
+ }
+ 
+ span.bartitle {
+   font-weight: bold;
+   font-style: italic;
+   color: darkblue
+ }
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/msegui/make_html.sh mseide-msegui-1.8/misc/doc_gen/msegui/make_html.sh
*** mseide-msegui-1.8.orig/misc/doc_gen/msegui/make_html.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/msegui/make_html.sh	2008-08-18 18:21:34.000000000 +0200
***************
*** 0 ****
--- 1,113 ----
+ #!/bin/sh
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ 
+ subos=
+ [ $os == "linux" ] && subos="unix"
+ [ $os == "win32" ] && subos="win32"
+ [ $os == "windows" ] && subos="win32"
+ 
+ #fpc_ver=`fpc -l | head -1 | awk '{ print $5; }'`
+ 
+ this_dir=`pwd`
+ 
+ # reading the settings
+ source ../ini/fplib_doc.ini
+ source ../ini/msegui_doc.ini
+ 
+ [ -d $msegui_doc_root ] || {
+   echo -e "Directory $msegui_doc_root does not exist but should be created by a make_xml.sh. So, exiting..."
+   exit
+ }
+ 
+ InputFileList=inputfile.txt
+ DescrFileList=descrfile.txt
+ 
+ function do_it () {
+ # $1 = $ref
+ # $2 = PkgName
+ # $3 = inc_dirs
+ # $4 = defines
+ # $5 = external imports
+ 
+   local inc_dirs; local imports;
+   local src_dir; local xml_dir; local html_dir;
+   local DescrFiles;
+   local CurInputFileList; local CurDescrFileList;
+   local unit_file; local pas_file; local pp_file; local cur_dir_inc;
+ 
+   src_dir="$msegui_src_dir/$1"
+   xml_dir=${msegui_doc_root}/xml/$1
+   [ -d $xml_dir ] || {
+     echo -e "Directory $xml_dir does not exist. So, skipping..."
+     return
+   }
+   html_dir=${msegui_doc_root}/html/$1
+   
+ # recreating the HTML doc dir to empty its contents
+   rm -rf -- $html_dir
+   mkdir -p -- $html_dir || exit 0
+ 
+ # create description file list
+   DescrFiles=`find $xml_dir -name *.xml`
+ 
+   inc_dirs=
+   for id in $3; do
+     inc_dirs="${inc_dirs} -Fi${fpc_src_dir}/$1/${id}"
+   done
+   
+   imports=
+   for imp in $5; do
+     imports="${imports} --import=${imp}"
+   done
+ 
+ # [re]create input file list
+   CurInputFileList=$html_dir/$InputFileList
+   [ -f $CurInputFileList ] && rm -f $CurInputFileList
+ 
+ # [re]create description file list
+   CurDescrFileList=$html_dir/$DescrFileList
+   [ -f $CurDescrFileList ] && rm -f $CurDescrFileList
+ 
+   for descr in $DescrFiles; do
+     echo $descr >> $CurDescrFileList  
+ 
+ #   only existing XMLs -> *.(pas|pp)   
+     unit_file=`echo $descr | awk -v R1="${msegui_doc_root}/xml/" -v R2="$msegui_src_dir/" '{ gsub(R1,R2,$0); print $0; }' | sed 's/.\xml//g'`
+   
+     pas_file="${unit_file}.pas"
+     if [ -f $pas_file ]; then
+       cur_dir_inc="-Fi"`dirname $pas_file`
+       echo $pas_file $cur_dir_inc "$inc_dirs" >> $CurInputFileList  
+     fi
+   
+     pp_file="${unit_file}.pp"
+     if [ -f $pp_file ]; then
+       cur_dir_inc="-Fi"`dirname $pp_file`
+       echo $pp_file $cur_dir_inc "$inc_dirs" >> $CurInputFileList  
+     fi
+ 
+   done
+ 
+   FPDocParams="--content=${msegui_doc_root}/html/$1/$2.xct --package=$2 --descr=$xml_dir/$2.xml --format=html $imports"
+ 
+   cd $html_dir
+   fpdoc --descr=@$DescrFileList --input=@$InputFileList $FPDocParams
+   rm -f -- $CurInputFileList $CurDescrFileList $html_dir/$2.xml
+ }
+ 
+ msegui_inc_dirs=""
+ if [ -f ~/mseguidoc_xml.inc ]; then
+   for inc_dir in `cat ~/mseguidoc_xml.inc`; do
+     msegui_inc_dirs="$msegui_inc_dirs ${inc_dir}"
+   done
+ fi
+ 
+ do_it "lib" "msegui_lib" "$msegui_inc_dirs" "$msegui_defines" "$msegui_imports"
+ 
+ cd $this_dir
+ #===============================
+ 
+ exit 0
+ 
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/msegui/make_xml.sh mseide-msegui-1.8/misc/doc_gen/msegui/make_xml.sh
*** mseide-msegui-1.8.orig/misc/doc_gen/msegui/make_xml.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/msegui/make_xml.sh	2008-08-18 18:21:52.000000000 +0200
***************
*** 0 ****
--- 1,116 ----
+ #!/bin/sh
+ 
+ this_dir=`pwd`
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ 
+ arch="${cpu}-${os}"
+ 
+ #fpc_ver=`fpc -l | head -1 | awk '{ print $5; }'`
+ 
+ this_dir=`pwd`
+ 
+ # reading the settings
+ source ../ini/fplib_doc.ini
+ source ../ini/msegui_doc.ini
+ 
+ [ -d $msegui_doc_root ] || mkdir -p -- $msegui_doc_root || exit
+ #*******************************************************************************************
+ function one_dir () {
+ # $1 : output directory for XML-files
+ # $2 : package name to write in XML-files
+ # $3 : -Fi<include_dir>-s & -d<define>-s 
+ 
+   local in_file; local out_file;
+ 
+   for in_file in `ls -A1 *.pas *.pp 2>/dev/null`; do
+     cat ./$in_file | head -40 | egrep -ie "^[ \t]*program[[:space:]]+[[:alpha:]]+[_[:alnum:]]*[[:space:]]*;" >/dev/null && continue  
+     out_file=$1"/"`echo $in_file | sed "s/\.\(pas\|pp\)$/\.xml/"`
+     echo "  ${in_file} -> ${out_file}"
+     [ -f $out_file ] || rm -f -- $out_file
+ 
+     if ! makeskel --package=$2 --input=./${in_file}" $3" --output=${out_file} --disable-private --disable-protected; then
+       rm -f -- ${out_file}
+     fi
+ 
+   done
+ }
+ #--------------
+ function do_it () {
+ # $1 : source unit dirs list
+ # $2 : subdirectory in the source root dir
+ # $3 : include dirs
+ # $4 : defines 
+ 
+   local inc_dirs1; local dir; local tmp; local out_dir; local pkg_name; local src_dir; local xml_dir;
+   
+   [ -d $msegui_doc_root/xml/$2 ] || mkdir -p -- $msegui_doc_root/xml/$2
+   cp -f -- $this_dir/../xml_templates/msegui_${2}.xml $msegui_doc_root/xml/$2
+ 
+   for dir in $1; do
+ #   where to put output XML files
+     xml_dir=`echo $dir | awk -v R1="${msegui_src_dir}/" -v R2="$msegui_doc_root/xml/" '{ gsub(R1,R2,$0); print $0; }'`
+     
+ #   recreating the XML dir to empty its contents
+     rm -rf -- $xml_dir
+     mkdir -p -- $xml_dir || exit 0
+     
+     inc_dirs1="-Fi./ -Fi${dir} $3"
+     tmp=`echo -e $dir | awk -v R=${msegui_src_dir}/$2/ '{ gsub(R,"",$0); print $0; }'`
+ #   package name may not contain "-" & "+"   
+     pkg_name=`echo -e $tmp | tr "+\/-" "_"`
+ 
+ #   the only way to correctly process "../*" path references in the source files
+     cd $dir || exit
+     echo -e "\nEntering ${dir}..."
+ 
+     one_dir $xml_dir $pkg_name "$3 $4"
+ 
+   done
+ }
+ 
+ #---------- MSEGUI Lib ----------------------------------------
+ 
+ for subdir in $msegui_dirs; do
+ 
+   cur_dir=$msegui_src_dir/$subdir
+   [ -d $cur_dir ] || continue
+   
+ # obtaining the list of directories with msegui source files
+   for f in `find $cur_dir/ -iregex '.*\.\(pas\|pp\)'`; do
+     tmp=`dirname $f`   
+     [ -d $tmp ] && echo -e $tmp; 
+   done | sort -ru | sed '/\(regcomponents\|designutils\)/d' > ~/mseguidoc_xml.dirs;
+   cur_dirs=
+   for dir1 in `cat ~/mseguidoc_xml.dirs`; do
+     cur_dirs="$cur_dirs $dir1"
+   done
+   rm -f -- ~/mseguidoc_xml.dirs
+ 
+ # obtaining the list of directories with msegui include files
+   for i in `find $cur_dir/ -iname *.inc`; do
+     tmp=`dirname $i` 
+     [ -d $tmp ] && echo -e "-Fi$tmp"; 
+   done | sort -u | sed '/\(regcomponents\|designutils\)/d' > ~/mseguidoc_xml.inc;
+ # forming input arguments string for makeskel 
+   inc_dirs=""
+   for inc_dir1 in `cat ~/mseguidoc_xml.inc`; do
+     inc_dirs="$inc_dirs $inc_dir1"
+   done
+ #  rm -f -- ~/mseguidoc_xml.inc
+ 
+   defs=""
+   for def in $msegui_defines; do
+     defs="${defs} -d${def}"
+   done
+ 
+   do_it "$cur_dirs" $subdir "$inc_dirs" "$defs"
+   
+ done
+ 
+ cd $this_dir
+ 
+ exit 0
+ 
+ 
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/README.TXT mseide-msegui-1.8/misc/doc_gen/README.TXT
*** mseide-msegui-1.8.orig/misc/doc_gen/README.TXT	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/README.TXT	2008-04-01 20:05:00.000000000 +0200
***************
*** 0 ****
--- 1,3 ----
+ The sources of this tool can be found on :
+ 
+ https://msedocumenting.svn.sourceforge.net/svnroot/msedocumenting/mse/trunk/tools/doc
diff -N -c -r mseide-msegui-1.8.orig/misc/doc_gen/xml_templates/msegui_lib.xml mseide-msegui-1.8/misc/doc_gen/xml_templates/msegui_lib.xml
*** mseide-msegui-1.8.orig/misc/doc_gen/xml_templates/msegui_lib.xml	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/doc_gen/xml_templates/msegui_lib.xml	2008-04-01 20:04:00.000000000 +0200
***************
*** 0 ****
--- 1,13 ----
+ <?xml version="1.0" encoding="ISO8859-1"?>
+ <fpdoc-descriptions>
+ <package name="msegui">
+ <short>MSE GUI Component Library</short>
+ <descr>
+ <p>
+ The MSE GUI Component Library is a set of visual components to create GUI applications for Window and Linux.
+ No huge toolkits ( Qt,Gtk,.. ) are required - the internal Win32 GUI ( Windows ) and XLibs ( Linux ) are used to draw widgets.
+ It is tightly bound with FPC, not a Delphi clone but more likely a Delphi redesign and extention for particular people needs.
+ </p>
+ </descr>
+ </package>
+ </fpdoc-descriptions>
diff -N -c -r mseide-msegui-1.8.orig/misc/svn_upd_script/README.txt mseide-msegui-1.8/misc/svn_upd_script/README.txt
*** mseide-msegui-1.8.orig/misc/svn_upd_script/README.txt	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/svn_upd_script/README.txt	2008-04-01 21:13:00.000000000 +0200
***************
*** 0 ****
--- 1,4 ----
+ Run this script from within a write-enabled directory 
+ which then will be used for building 
+ your most up-to-date version of MSEide+MSEgui
+ ( /usr/src/SVNROOT/mseide-mse/, etc ).
diff -N -c -r mseide-msegui-1.8.orig/misc/svn_upd_script/updatefromsvn mseide-msegui-1.8/misc/svn_upd_script/updatefromsvn
*** mseide-msegui-1.8.orig/misc/svn_upd_script/updatefromsvn	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/svn_upd_script/updatefromsvn	2008-08-18 18:22:46.000000000 +0200
***************
*** 0 ****
--- 1,34 ----
+ #!/bin/sh
+ # This script gets an update of MSEide+MSEgui into ./trunk or ./
+ # if ./ is a SVN directory
+ # from SVN and compiles MSEide. The new IDE is 
+ # ./trunk/apps/ide/mseide or ./apps/ide/mseide
+ # SVN 
+ # http://subversion.tigris.org/project_packages.html
+ # and FPC 2.2 
+ # http://www.freepascal.org/download.var
+ # must be installed on the system.
+ #
+ 
+ os=`fpc -iSO`
+ cpu=`fpc -iSP`
+ arch="${cpu}-${os}"
+ 
+ CURDIR=$PWD
+ if test -d .svn 
+ then
+ DESTDIR=.
+ else
+ DESTDIR=./trunk
+ fi
+ if svn co https://mseide-msegui.svn.sourceforge.net/svnroot/mseide-msegui/trunk $DESTDIR
+ then
+ cd $DESTDIR
+ if
+ ppc386 apps/ide/mseide.pas -Fulib/common/* -B -Fulib/common/kernel/${arch} -Fi/lib/common/kernel 
+ then
+ echo Success:
+ echo MSEide compiled to ${PWD}/apps/ide/mseide
+ fi
+ cd $CURDIR
+ fi
diff -N -c -r mseide-msegui-1.8.orig/misc/xft2gs/do_xft.sh mseide-msegui-1.8/misc/xft2gs/do_xft.sh
*** mseide-msegui-1.8.orig/misc/xft2gs/do_xft.sh	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/xft2gs/do_xft.sh	2008-03-31 21:01:00.000000000 +0200
***************
*** 0 ****
--- 1,273 ----
+ #!/bin/sh
+ 
+ SHORTPATHS=1
+ AUTOSHORTGS=1
+ PSF_ONLYALIASES=1
+ TTF_ONLYALIASES=0
+ 
+ LANG_NAME=`basename $LANG .$(locale charmap) | sed -e s/_.*//`
+ 
+ function prefer_list_1file {
+ cat ${2} | \
+   egrep -v -e "^[ \t]*$" | sed -e "s/^[ \t]\+//g" | sed -e "s/[ \t]\+$//g" | \
+   egrep -e "<prefer>" -B 1 -A 24 | \
+   egrep "<family>${1}</family>" -A 25 | awk 'BEGIN{toprint=1;}{
+     if ($0 ~ "</prefer>") { 
+       toprint=0; 
+     }
+     if (toprint == 1) { print $0; }
+   }' | \
+   egrep -v "</*alias>|</*prefer>" | sed -e "s/<\/*family>//g" | sed 1d >> /tmp/${1}-pref.txt
+ }
+ 
+ function prefer_list {
+   local files
+   files=
+   files=$files" "`ls -1 /etc/fonts/conf.d/*-unifont.conf 2>/dev/null`
+   files=$files" "`ls -1 /etc/fonts/conf.d/*-nonlatin.conf 2>/dev/null`
+   files=$files" "`ls -1 /etc/fonts/conf.d/*-latin.conf 2>/dev/null`
+   files=`echo $files | sort -ru`
+   files=$files" /etc/fonts/fonts.conf"
+   [ -f /tmp/${1}-pref.txt ] && rm -f -- /tmp/${1}-pref.txt
+   for file in $files; do
+     echo " ..processing $file for \"$1\""
+     prefer_list_1file $1 $file
+   done
+ }
+ 
+ [ -f /tmp/Fontmap.GS-1 ] && rm -f -- /tmp/Fontmap.GS-1
+ [ -f /tmp/Fontmap.GS-2 ] && rm -f -- /tmp/Fontmap.GS-2
+ [ -f /tmp/serif-pref.txt  ] && rm -f -- /tmp/serif-pref.txt
+ [ -f /tmp/sans-serif-pref.txt  ] && rm -f -- /tmp/sans-serif-pref.txt
+ [ -f /tmp/monospace-pref.txt ] && rm -f -- /tmp/monospace-pref.txt
+ [ -f /tmp/fc-list.txt ] && rm -f -- /tmp/fc-list.txt
+ 
+ prefer_list serif
+ prefer_list sans-serif
+ prefer_list monospace
+ 
+ fc-list :lang=: file family slant weight > /tmp/fc-list.txt
+ fc-list :lang=$LANG_NAME file family slant weight >> /tmp/fc-list.txt
+ 
+ cat /tmp/fc-list.txt | egrep -v "^[ \t]*$" | awk \
+   -v OPT1=$SHORTPATHS \
+   -v OPT2=$AUTOSHORTGS \
+   -v OPT3=$PSF_ONLYALIASES \
+   -v OPT4=$TTF_ONLYALIASES 'BEGIN {
+   sans_n=0;
+   delete SANS;
+   while (getline SANS[++sans_n] < "/tmp/sans-serif-pref.txt") {;}
+   SANS1=sans_n; 
+   sans_styles_n=0;
+   delete SANS_STYLES;
+   delete SANS_TYPES;
+   
+   serif_n=0;
+   delete SERIF;
+   while (getline SERIF[++serif_n] < "/tmp/serif-pref.txt") {;}
+   SERIF1=serif_n;
+   serif_styles_n=0; 
+   delete SERIF_STYLES;
+   delete SERIF_TYPES;
+   
+   mono_n=0;
+   delete MONO;
+   while (getline MONO[++mono_n] < "/tmp/monospace-pref.txt") {;}
+   MONO1=mono_n; 
+   mono_styles_n=0;
+   delete MONO_STYLES;
+   delete MONO_TYPES;
+   
+   print "" > "/tmp/Fontmap.GS-2";
+ } {
+   n1=split($0,A,":");
+ 
+   gsub("^[ ]+|[ ]+$","",A[1]);
+   gsub("^[ ]+|[ ]+$","",A[2]);
+   gsub("^[ ]+|[ ]+$","",A[3]);
+   gsub("^[ ]+|[ ]+$","",A[4]);  
+ 
+   style="";
+ # weight :
+ #
+ # 50 = Light
+ # 75 = Book
+ # 80,100 = Regular,Normal,Medium
+ # 180 = Demi
+ # 200 = Bold
+ #
+   gsub("weight=","",A[4]);
+   if ( (A[4]+0) > 170) { style="Bold"; }
+ 
+ # slant :
+ #
+ # 100 = Italic
+ # 110 = Oblique  
+ #
+   gsub("slant=","",A[3]);
+   if ( (A[3]+0) > 90 ) {
+     if ( style != "" ) {
+       style=style" Italic";
+     } else {
+       style="Italic";
+     }
+   }
+   
+   famname= A[2];
+ 
+   fstyle= style;
+   fstyle1= style;
+    
+   gsub(" ","",fstyle);
+   if (fstyle != "") { fstyle="-"fstyle; }
+   if (fstyle1 != "") { fstyle1=" "fstyle1; }
+   
+   gsub(" ","-",style);
+   if ( style != "" ) { style="-"style; }
+   gsub("--","-",style);  
+ 
+   if (( OPT1 == 1 ) || (( OPT2 == 1 ) && ( A[1] ~ /\/gsfonts|defoma|cups|ghostscript\//) ) ) 
+   {
+     n2= split(A[1],B,"/");
+     A[1]=B[n2];
+   } 
+   
+   ft="";  
+   if ( A[1] ~ /\.(ttf|TTF)$/) {
+     ft="TTF-";
+   } else if ( A[1] ~ /\.(pf(a|b))|(PF(A|B))$/ ) {
+     ft="PSF-"; 
+   } else if ( A[1] ~ /\.(gsf|GSF)$/ ) {
+     ft="GSF-"; 
+   }
+     
+ # B[n2] - short file name
+ # A[2] - concatenated family name  
+ # fam - original family name
+ # style - concatenated style c "-"
+   
+   for (i=1; i<= sans_n; i++) {
+ #-- Font name match -----        
+     if (SANS[i] == A[2] ) {
+ #---- at higher priority ---            
+       if (i < SANS1) {
+ #------ set the new priority as current ---      
+         SANS1=i;
+ #------ restart the style info for the font
+ #------ with the higher priority
+ 	sans_styles_n= 0;
+ 	delete SANS_STYLES;
+ 	delete SANS_TYPES;
+         SANS_STYLES[++sans_styles_n]=style;
+         SANS_TYPES[sans_styles_n]=ft;
+ #------ continue on the current priority
+       } else if (i == SANS1)  {
+         SANS_STYLES[++sans_styles_n]=style;
+         SANS_TYPES[sans_styles_n]=ft;
+       }
+     } 
+   }
+ 
+   for (i=1; i <= serif_n; i++) {
+     if (SERIF[i] == A[2] ) {
+       if (i < SERIF1) {
+         SERIF1=i;
+ 	serif_styles_n= 0;
+ 	delete SERIF_STYLES;
+ 	delete SERIF_TYPES;
+         SERIF_STYLES[++serif_styles_n]=style;
+         SERIF_TYPES[serif_styles_n]=ft;
+       } else if (i == SERIF1) { 
+ 	SERIF_STYLES[++serif_styles_n]=style;
+ 	SERIF_TYPES[serif_styles_n]=ft;
+       }
+     } 
+   }
+ 
+   for (i=1; i <= mono_n; i++) {
+   
+     if (MONO[i] == A[2] ) {
+       if (i < MONO1) {
+         MONO1=i;
+ 	mono_styles_n= 0;
+ 	delete MONO_STYLES;
+ 	delete MONO_TYPES;
+         MONO_STYLES[++mono_styles_n]=style;
+         MONO_TYPES[mono_styles_n]=ft;
+       } else if (i == MONO1) { 
+ 	MONO_STYLES[++mono_styles_n]=style;
+ 	MONO_TYPES[mono_styles_n]=ft;
+       }
+     } 
+   }
+  
+   gsub(" ","-",A[2]);
+   if ((( OPT3 != 1 ) && ((ft == "PSF-") || (ft == "GSF-"))) || (( OPT4 != 1 ) && (ft == "TTF-"))) {
+     print "/"ft""A[2]""style"\t("A[1]")\t;"; 
+     print "("famname""fstyle")\t/"ft""A[2]""style"\t;" >> "/tmp/Fontmap.GS-2";
+   }
+   
+ } END {
+   print "" > "/tmp/Fontmap.GS-1";
+   
+   for (i=1; i <= sans_styles_n; i++) {
+     SANS_TYPE=""
+     if ((( OPT3 != 1 ) && ((SANS_TYPES[i] == "PSF-") || (SANS_TYPES[i] == "GSF-"))) || (( OPT4 != 1 ) && (SANS_TYPES[i] == "TTF-"))) {
+       SANS_TYPE=SANS_TYPES[i]; 
+     }
+     SANS_STYLE=SANS_STYLES[i];
+     if ( SANS_STYLE != "" ) {
+       gsub("-","",SANS_STYLE);
+       SANS_STYLE="-"SANS_STYLE;
+     }
+     gsub(" ","-",SANS[SANS1]);
+     print "/Sans"SANS_STYLE"\t/"SANS_TYPE""SANS[SANS1]""SANS_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";
+     print "/Helvetica"SANS_STYLE"\t/"SANS_TYPE""SANS[SANS1]""SANS_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";    
+   }
+ 
+   for (i=1; i <= serif_styles_n; i++) {
+     SERIF_TYPE=""
+     if ((( OPT3 != 1 ) && ((SERIF_TYPES[i] == "PSF-") || (SERIF_TYPES[i] == "GSF-"))) || (( OPT4 != 1 ) && (SERIF_TYPES[i] == "TTF-"))) {
+       SERIF_TYPE=SERIF_TYPES[i]; 
+     }
+     SERIF_STYLE=SERIF_STYLES[i];
+     if ( SERIF_STYLE != "" ) {
+       gsub("-","",SERIF_STYLE);
+       SERIF_STYLE="-"SERIF_STYLE;
+     }
+     gsub(" ","-",SERIF[SERIF1]);
+     print "/Serif"SERIF_STYLE"\t/"SERIF_TYPE""SERIF[SERIF1]""SERIF_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";
+     print "/Times"SERIF_STYLE"\t/"SERIF_TYPE""SERIF[SERIF1]""SERIF_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";
+   }
+ 
+   for (i=1; i <= mono_styles_n; i++) {
+     MONO_TYPE=""
+     if ((( OPT3 != 1 ) && ((MONO_TYPES[i] == "PSF-") || (MONO_TYPES[i] == "GSF-"))) || (( OPT4 != 1 ) && (MONO_TYPES[i] == "TTF-"))) {
+       MONO_TYPE=MONO_TYPES[i]; 
+     }
+     MONO_STYLE=MONO_STYLES[i];
+     if ( MONO_STYLE != "" ) {
+       gsub("-","",MONO_STYLE);
+       MONO_STYLE="-"MONO_STYLE;
+     }
+     gsub(" ","-",MONO[MONO1]);
+     print "/Mono"MONO_STYLE"\t/"MONO_TYPE""MONO[MONO1]""MONO_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";
+     print "/Fixed"MONO_STYLE"\t/"MONO_TYPE""MONO[MONO1]""MONO_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";
+     print "/Courier"MONO_STYLE"\t/"MONO_TYPE""MONO[MONO1]""MONO_STYLES[i]"\t;" >> "/tmp/Fontmap.GS-1";    
+   }
+ 
+ }' | sort -u > ./Fontmap.GS.xft
+ 
+ cat /tmp/Fontmap.GS-2 | sort -u >> ./Fontmap.GS.xft
+ cat /tmp/Fontmap.GS-1 | sort -u >> ./Fontmap.GS.xft
+ 
+ rm -f -- \
+   /tmp/Fontmap.GS-1 \
+   /tmp/Fontmap.GS-2 \
+   /tmp/serif-pref.txt \
+   /tmp/sans-serif-pref.txt \
+   /tmp/monospace-pref.txt \
+   /tmp/fc-list.txt
+ 
+ 
+ exit 0
diff -N -c -r mseide-msegui-1.8.orig/misc/xft2gs/Fontmap.GS.example mseide-msegui-1.8/misc/xft2gs/Fontmap.GS.example
*** mseide-msegui-1.8.orig/misc/xft2gs/Fontmap.GS.example	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/xft2gs/Fontmap.GS.example	2008-03-31 21:01:00.000000000 +0200
***************
*** 0 ****
--- 1,224 ----
+ /TTF-Arhangai	(arhangai.ttf)	;
+ /TTF-Arhangai	(Arhangai.ttf)	;
+ /TTF-Arial	(arial.ttf)	;
+ /TTF-Arial-Black	(ariblk.ttf)	;
+ /TTF-Arial-Bold	(arialbd.ttf)	;
+ /TTF-Arial-Bold-Italic	(arialbi.ttf)	;
+ /TTF-Arial-Italic	(ariali.ttf)	;
+ /TTF-Comic-Sans-MS-Bold	(comicbd.ttf)	;
+ /TTF-Comic-Sans-MS	(comic.ttf)	;
+ /TTF-Courier-New-Bold	(courbd.ttf)	;
+ /TTF-Courier-New-Bold-Italic	(courbi.ttf)	;
+ /TTF-Courier-New	(cour.ttf)	;
+ /TTF-Courier-New-Italic	(couri.ttf)	;
+ /TTF-DejaVu-Sans-Bold	(DejaVu-Sans-Bold.ttf)	;
+ /TTF-DejaVu-Sans-Bold	(DejaVuSans-Bold.ttf)	;
+ /TTF-DejaVu-Sans-Bold-Italic	(DejaVu-Sans-Bold-Oblique.ttf)	;
+ /TTF-DejaVu-Sans-Bold-Italic	(DejaVuSans-BoldOblique.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold	(DejaVu-Sans-Condensed-Bold.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold	(DejaVuSansCondensed-Bold.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold-Italic	(DejaVu-Sans-Condensed-Bold-Oblique.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold-Italic	(DejaVuSansCondensed-BoldOblique.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed	(DejaVu-Sans-Condensed.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed	(DejaVuSansCondensed.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Italic	(DejaVu-Sans-Condensed-Oblique.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Italic	(DejaVuSansCondensed-Oblique.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Light	(DejaVu-Sans-ExtraLight.ttf)	;
+ /TTF-DejaVu-Sans,DejaVu-Sans-Light	(DejaVuSans-ExtraLight.ttf)	;
+ /TTF-DejaVu-Sans	(DejaVu-Sans.ttf)	;
+ /TTF-DejaVu-Sans	(DejaVuSans.ttf)	;
+ /TTF-DejaVu-Sans-Italic	(DejaVu-Sans-Oblique.ttf)	;
+ /TTF-DejaVu-Sans-Italic	(DejaVuSans-Oblique.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Bold	(DejaVu-Sans-Mono-Bold.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Bold	(DejaVuSansMono-Bold.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Bold-Italic	(DejaVu-Sans-Mono-Bold-Oblique.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Bold-Italic	(DejaVuSansMono-BoldOblique.ttf)	;
+ /TTF-DejaVu-Sans-Mono	(DejaVu-Sans-Mono.ttf)	;
+ /TTF-DejaVu-Sans-Mono	(DejaVuSansMono.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Italic	(DejaVu-Sans-Mono-Oblique.ttf)	;
+ /TTF-DejaVu-Sans-Mono-Italic	(DejaVuSansMono-Oblique.ttf)	;
+ /TTF-DejaVu-Serif-Bold	(DejaVu-Serif-Bold.ttf)	;
+ /TTF-DejaVu-Serif-Bold	(DejaVuSerif-Bold.ttf)	;
+ /TTF-DejaVu-Serif-Bold-Italic	(DejaVu-Serif-Bold-Oblique.ttf)	;
+ /TTF-DejaVu-Serif-Bold-Italic	(DejaVuSerif-BoldOblique.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold	(DejaVu-Serif-Condensed-Bold.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold	(DejaVuSerifCondensed-Bold.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold-Italic	(DejaVu-Serif-Condensed-Bold-Oblique.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold-Italic	(DejaVuSerifCondensed-BoldOblique.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed	(DejaVu-Serif-Condensed.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed	(DejaVuSerifCondensed.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Italic	(DejaVu-Serif-Condensed-Oblique.ttf)	;
+ /TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Italic	(DejaVuSerifCondensed-Oblique.ttf)	;
+ /TTF-DejaVu-Serif	(DejaVu-Serif.ttf)	;
+ /TTF-DejaVu-Serif	(DejaVuSerif.ttf)	;
+ /TTF-DejaVu-Serif-Italic	(DejaVu-Serif-Oblique.ttf)	;
+ /TTF-DejaVu-Serif-Italic	(DejaVuSerif-Oblique.ttf)	;
+ /TTF-Franklin-Gothic-Medium	(framd.ttf)	;
+ /TTF-Franklin-Gothic-Medium-Italic	(framdit.ttf)	;
+ /TTF-FreeMono-Bold	(FreeMono-Bold.ttf)	;
+ /TTF-FreeMono-Bold	(FreeMonoBold.ttf)	;
+ /TTF-FreeMono-Bold-Italic	(FreeMono-BoldOblique.ttf)	;
+ /TTF-FreeMono-Bold-Italic	(FreeMonoBoldOblique.ttf)	;
+ /TTF-FreeMono	(FreeMono-Medium.ttf)	;
+ /TTF-FreeMono	(FreeMono.ttf)	;
+ /TTF-FreeMono-Italic	(FreeMono-Oblique.ttf)	;
+ /TTF-FreeMono-Italic	(FreeMonoOblique.ttf)	;
+ /TTF-FreeSans-Bold	(FreeSans-Bold.ttf)	;
+ /TTF-FreeSans-Bold	(FreeSansBold.ttf)	;
+ /TTF-FreeSans-Bold-Italic	(FreeSans-BoldOblique.ttf)	;
+ /TTF-FreeSans-Bold-Italic	(FreeSansBoldOblique.ttf)	;
+ /TTF-FreeSans	(FreeSans-Medium.ttf)	;
+ /TTF-FreeSans	(FreeSans.ttf)	;
+ /TTF-FreeSans-Italic	(FreeSans-Oblique.ttf)	;
+ /TTF-FreeSans-Italic	(FreeSansOblique.ttf)	;
+ /TTF-FreeSerif-Bold	(FreeSerif-Bold.ttf)	;
+ /TTF-FreeSerif-Bold	(FreeSerifBold.ttf)	;
+ /TTF-FreeSerif-Bold-Italic	(FreeSerif-BoldItalic.ttf)	;
+ /TTF-FreeSerif-Bold-Italic	(FreeSerifBoldItalic.ttf)	;
+ /TTF-FreeSerif	(FreeSerif-Medium.ttf)	;
+ /TTF-FreeSerif	(FreeSerif.ttf)	;
+ /TTF-FreeSerif-Italic	(FreeSerif-Italic.ttf)	;
+ /TTF-FreeSerif-Italic	(FreeSerifItalic.ttf)	;
+ /TTF-Georgia-Bold	(georgiab.ttf)	;
+ /TTF-Georgia-Bold-Italic	(georgiaz.ttf)	;
+ /TTF-Georgia	(georgia.ttf)	;
+ /TTF-Georgia-Italic	(georgiai.ttf)	;
+ /TTF-Impact	(impact.ttf)	;
+ /TTF-Lucida-Console	(lucon.ttf)	;
+ /TTF-Lucida-Sans-Unicode	(l_10646.ttf)	;
+ /TTF-Microsoft-Sans-Serif	(micross.ttf)	;
+ /TTF-Palatino-Linotype-Bold-Italic	(palabi.ttf)	;
+ /TTF-Palatino-Linotype-Bold	(palab.ttf)	;
+ /TTF-Palatino-Linotype-Italic	(palai.ttf)	;
+ /TTF-Palatino-Linotype	(pala.ttf)	;
+ /TTF-Sylfaen,SylfaenARM	(sylfaen.ttf)	;
+ /TTF-Tahoma-Bold	(tahomabd.ttf)	;
+ /TTF-Tahoma	(tahoma.ttf)	;
+ /TTF-Thryomanes-Bold-Italic	(thrybi__.ttf)	;
+ /TTF-Thryomanes-Bold-Italic	(Thryomanes-BoldItalic.ttf)	;
+ /TTF-Thryomanes-Bold	(thryb___.ttf)	;
+ /TTF-Thryomanes-Bold	(Thryomanes-Bold.ttf)	;
+ /TTF-Thryomanes-Italic	(thryi___.ttf)	;
+ /TTF-Thryomanes-Italic	(Thryomanes-Italic.ttf)	;
+ /TTF-Thryomanes	(Thryomanes-Normal.ttf)	;
+ /TTF-Thryomanes	(thryrg__.ttf)	;
+ /TTF-Times-New-Roman-Bold-Italic	(timesbi.ttf)	;
+ /TTF-Times-New-Roman-Bold	(timesbd.ttf)	;
+ /TTF-Times-New-Roman-Italic	(timesi.ttf)	;
+ /TTF-Times-New-Roman	(times.ttf)	;
+ /TTF-Trebuchet-MS-Bold-Italic	(trebucbi.ttf)	;
+ /TTF-Trebuchet-MS-Bold	(trebucbd.ttf)	;
+ /TTF-Trebuchet-MS-Italic	(trebucit.ttf)	;
+ /TTF-Trebuchet-MS	(trebuc.ttf)	;
+ /TTF-Verdana-Bold-Italic	(verdanaz.ttf)	;
+ /TTF-Verdana-Bold	(verdanab.ttf)	;
+ /TTF-Verdana-Italic	(verdanai.ttf)	;
+ /TTF-Verdana	(verdana.ttf)	;
+ 
+ (Arhangai)	/TTF-Arhangai	;
+ (Arial Black)	/TTF-Arial-Black	;
+ (Arial-BoldItalic)	/TTF-Arial-Bold-Italic	;
+ (Arial-Bold)	/TTF-Arial-Bold	;
+ (Arial-Italic)	/TTF-Arial-Italic	;
+ (Arial)	/TTF-Arial	;
+ (Comic Sans MS-Bold)	/TTF-Comic-Sans-MS-Bold	;
+ (Comic Sans MS)	/TTF-Comic-Sans-MS	;
+ (Courier New-BoldItalic)	/TTF-Courier-New-Bold-Italic	;
+ (Courier New-Bold)	/TTF-Courier-New-Bold	;
+ (Courier New-Italic)	/TTF-Courier-New-Italic	;
+ (Courier New)	/TTF-Courier-New	;
+ (DejaVu Sans-BoldItalic)	/TTF-DejaVu-Sans-Bold-Italic	;
+ (DejaVu Sans-Bold)	/TTF-DejaVu-Sans-Bold	;
+ (DejaVu Sans,DejaVu Sans Condensed-BoldItalic)	/TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold-Italic	;
+ (DejaVu Sans,DejaVu Sans Condensed-Bold)	/TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Bold	;
+ (DejaVu Sans,DejaVu Sans Condensed-Italic)	/TTF-DejaVu-Sans,DejaVu-Sans-Condensed-Italic	;
+ (DejaVu Sans,DejaVu Sans Condensed)	/TTF-DejaVu-Sans,DejaVu-Sans-Condensed	;
+ (DejaVu Sans,DejaVu Sans Light)	/TTF-DejaVu-Sans,DejaVu-Sans-Light	;
+ (DejaVu Sans-Italic)	/TTF-DejaVu-Sans-Italic	;
+ (DejaVu Sans Mono-BoldItalic)	/TTF-DejaVu-Sans-Mono-Bold-Italic	;
+ (DejaVu Sans Mono-Bold)	/TTF-DejaVu-Sans-Mono-Bold	;
+ (DejaVu Sans Mono-Italic)	/TTF-DejaVu-Sans-Mono-Italic	;
+ (DejaVu Sans Mono)	/TTF-DejaVu-Sans-Mono	;
+ (DejaVu Sans)	/TTF-DejaVu-Sans	;
+ (DejaVu Serif-BoldItalic)	/TTF-DejaVu-Serif-Bold-Italic	;
+ (DejaVu Serif-Bold)	/TTF-DejaVu-Serif-Bold	;
+ (DejaVu Serif,DejaVu Serif Condensed-BoldItalic)	/TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold-Italic	;
+ (DejaVu Serif,DejaVu Serif Condensed-Bold)	/TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Bold	;
+ (DejaVu Serif,DejaVu Serif Condensed-Italic)	/TTF-DejaVu-Serif,DejaVu-Serif-Condensed-Italic	;
+ (DejaVu Serif,DejaVu Serif Condensed)	/TTF-DejaVu-Serif,DejaVu-Serif-Condensed	;
+ (DejaVu Serif-Italic)	/TTF-DejaVu-Serif-Italic	;
+ (DejaVu Serif)	/TTF-DejaVu-Serif	;
+ (Franklin Gothic Medium-Italic)	/TTF-Franklin-Gothic-Medium-Italic	;
+ (Franklin Gothic Medium)	/TTF-Franklin-Gothic-Medium	;
+ (FreeMono-BoldItalic)	/TTF-FreeMono-Bold-Italic	;
+ (FreeMono-Bold)	/TTF-FreeMono-Bold	;
+ (FreeMono-Italic)	/TTF-FreeMono-Italic	;
+ (FreeMono)	/TTF-FreeMono	;
+ (FreeSans-BoldItalic)	/TTF-FreeSans-Bold-Italic	;
+ (FreeSans-Bold)	/TTF-FreeSans-Bold	;
+ (FreeSans-Italic)	/TTF-FreeSans-Italic	;
+ (FreeSans)	/TTF-FreeSans	;
+ (FreeSerif-BoldItalic)	/TTF-FreeSerif-Bold-Italic	;
+ (FreeSerif-Bold)	/TTF-FreeSerif-Bold	;
+ (FreeSerif-Italic)	/TTF-FreeSerif-Italic	;
+ (FreeSerif)	/TTF-FreeSerif	;
+ (Georgia-BoldItalic)	/TTF-Georgia-Bold-Italic	;
+ (Georgia-Bold)	/TTF-Georgia-Bold	;
+ (Georgia-Italic)	/TTF-Georgia-Italic	;
+ (Georgia)	/TTF-Georgia	;
+ (Impact)	/TTF-Impact	;
+ (Lucida Console)	/TTF-Lucida-Console	;
+ (Lucida Sans Unicode)	/TTF-Lucida-Sans-Unicode	;
+ (Microsoft Sans Serif)	/TTF-Microsoft-Sans-Serif	;
+ (Palatino Linotype-BoldItalic)	/TTF-Palatino-Linotype-Bold-Italic	;
+ (Palatino Linotype-Bold)	/TTF-Palatino-Linotype-Bold	;
+ (Palatino Linotype-Italic)	/TTF-Palatino-Linotype-Italic	;
+ (Palatino Linotype)	/TTF-Palatino-Linotype	;
+ (Sylfaen,SylfaenARM)	/TTF-Sylfaen,SylfaenARM	;
+ (Tahoma-Bold)	/TTF-Tahoma-Bold	;
+ (Tahoma)	/TTF-Tahoma	;
+ (Thryomanes-BoldItalic)	/TTF-Thryomanes-Bold-Italic	;
+ (Thryomanes-Bold)	/TTF-Thryomanes-Bold	;
+ (Thryomanes-Italic)	/TTF-Thryomanes-Italic	;
+ (Thryomanes)	/TTF-Thryomanes	;
+ (Times New Roman-BoldItalic)	/TTF-Times-New-Roman-Bold-Italic	;
+ (Times New Roman-Bold)	/TTF-Times-New-Roman-Bold	;
+ (Times New Roman-Italic)	/TTF-Times-New-Roman-Italic	;
+ (Times New Roman)	/TTF-Times-New-Roman	;
+ (Trebuchet MS-BoldItalic)	/TTF-Trebuchet-MS-Bold-Italic	;
+ (Trebuchet MS-Bold)	/TTF-Trebuchet-MS-Bold	;
+ (Trebuchet MS-Italic)	/TTF-Trebuchet-MS-Italic	;
+ (Trebuchet MS)	/TTF-Trebuchet-MS	;
+ (Verdana-BoldItalic)	/TTF-Verdana-Bold-Italic	;
+ (Verdana-Bold)	/TTF-Verdana-Bold	;
+ (Verdana-Italic)	/TTF-Verdana-Italic	;
+ (Verdana)	/TTF-Verdana	;
+ 
+ /Courier-BoldItalic	/TTF-FreeMono-Bold-Italic	;
+ /Courier-Bold	/TTF-FreeMono-Bold	;
+ /Courier-Italic	/TTF-FreeMono-Italic	;
+ /Courier	/TTF-FreeMono	;
+ /Fixed-BoldItalic	/TTF-FreeMono-Bold-Italic	;
+ /Fixed-Bold	/TTF-FreeMono-Bold	;
+ /Fixed-Italic	/TTF-FreeMono-Italic	;
+ /Fixed	/TTF-FreeMono	;
+ /Helvetica-BoldItalic	/TTF-FreeSans-Bold-Italic	;
+ /Helvetica-Bold	/TTF-FreeSans-Bold	;
+ /Helvetica-Italic	/TTF-FreeSans-Italic	;
+ /Helvetica	/TTF-FreeSans	;
+ /Mono-BoldItalic	/TTF-FreeMono-Bold-Italic	;
+ /Mono-Bold	/TTF-FreeMono-Bold	;
+ /Mono-Italic	/TTF-FreeMono-Italic	;
+ /Mono	/TTF-FreeMono	;
+ /Sans-BoldItalic	/TTF-FreeSans-Bold-Italic	;
+ /Sans-Bold	/TTF-FreeSans-Bold	;
+ /Sans-Italic	/TTF-FreeSans-Italic	;
+ /Sans	/TTF-FreeSans	;
+ /Serif-BoldItalic	/TTF-FreeSerif-Bold-Italic	;
+ /Serif-Bold	/TTF-FreeSerif-Bold	;
+ /Serif-Italic	/TTF-FreeSerif-Italic	;
+ /Serif	/TTF-FreeSerif	;
+ /Times-BoldItalic	/TTF-FreeSerif-Bold-Italic	;
+ /Times-Bold	/TTF-FreeSerif-Bold	;
+ /Times-Italic	/TTF-FreeSerif-Italic	;
+ /Times	/TTF-FreeSerif	;
diff -N -c -r mseide-msegui-1.8.orig/misc/xft2gs/README.TXT mseide-msegui-1.8/misc/xft2gs/README.TXT
*** mseide-msegui-1.8.orig/misc/xft2gs/README.TXT	1970-01-01 01:00:00.000000000 +0100
--- mseide-msegui-1.8/misc/xft2gs/README.TXT	2008-08-18 14:20:05.000000000 +0200
***************
*** 0 ****
--- 1,73 ----
+ Script "do_xft.sh" :
+ 
+   1) obtains list of all fonts available via Freetype library
+   2) analyzes Freetype fonts configuration ( /etc/fonts/fonts.conf )
+   3) based on 1) and 2) builds file "./Fontmap.GS.xft" which can then 
+      be added to "Fontmap.GS" file ( GhostScript fonts mapper ) 
+      on your system ( or can even replace all its contents if 
+      no one except MSEgui works with PostScript ).
+ 
+ The purpose is to achieve expected look of fonts in GhostScript 
+ for PostScript data generated by the MSEgui's postscript printer 
+ component ( exactly as these fonts look on display in 
+ MSEgui applications ).
+ 
+ To have least problems with GhostScript finding TTF 
+ ( and other not GS-supplied ) fonts, me recommend to create links 
+ to all nedeed fonts files in /usr/share/ghostscript/fonts/
+ directory. 
+ The easiest way to do that is:
+ - enter /usr/share/ghostscript/fonts/ directory
+ - for each directory with TTF fonts ( $Your_TTF_DIR ), call command :
+    = lndir $Your_TTF_DIR
+ 
+   It'll create the necessary links.
+ 
+  * Obviously, you can store real font files in this directory 
+    but ususally XfssTT & Xft expect these files to be in another directory 
+    ( /usr/share/fonts/ ), and you may encounter incorrect Xft setup.
+ 
+ ========================
+ 
+ MSEgui constructs GhostScript font names from FreeType ones 
+ used in appications as follows :
+ 
+ {font name}[-[Bold][Italic]], examples :
+ 
+   Times,
+   Times-Bold,
+   Arial Narrow-BoldItalic
+   
+ "Bold" & "Italic" aren't replaced with locale specific keywords neither 
+ in MSEgui nor in generated PostScript data. But some fonts may describe 
+ oneself to be "Bold" or "Italic" in other languages. To cope this issue, 
+ this script detects the styles nor via the notation but 
+ the numeric info - "slant"(angle) and "weight".
+ 
+ If you will still have inexact look of "Times", "Courier" and "Helvetica" 
+ fonts then remove ( or comment out ) the following section of 
+ "/etc/fonts/fonts.conf" :
+ 
+         <match target="pattern">
+ 	  <test name="family"><string>Times</string></test>
+ 	  <edit name="family" mode="append" binding="same">
+ 	    <string>Nimbus Roman No9 L</string>
+ 	  </edit>
+ 	</match>
+         <match target="pattern">
+ 	  <test name="family"><string>Helvetica</string></test>
+ 	  <edit name="family" mode="append" binding="same">
+ 	    <string>Nimbus Sans L</string>
+ 	  </edit>
+ 	</match>
+         <match target="pattern">
+ 	  <test name="family"><string>Courier</string></test>
+ 	  <edit name="family" mode="append" binding="same">
+ 	    <string>Nimbus Mono L</string>
+ 	  </edit>
+ 	</match>
+ 
+ and restart XWindows for the changes to take effect.
+ 
+ 
+ Good luck !
